package config

import "github.com/kelseyhightower/envconfig"

// AutoTestProxyConfig is the configuration for the AutoTestProxy.
type AutoTestProxyConfig struct {
	MongoDB  *MongoDBConfig `json:"-"`
	Port     int            `json:"port" envconfig:"PORT" default:"0"`
	RecordID string         `json:"record_id" envconfig:"RECORD_ID" default:""`
}

// GetAutoTestProxyEnv gets all env variables related to dashboard.
func GetAutoTestProxyEnv() (*AutoTestProxyConfig, error) {
	cfg := AutoTestProxyConfig{}
	err := envconfig.Process("", &cfg)
	return &cfg, err
}
